package com.wedimob.slideshare.task;

import java.text.DecimalFormat;

public abstract class Task<I, O> implements Runnable {
    protected O output;
    protected I input;
    protected Exception e;
    protected PoolExecutor pool;
    protected int timeout;
    protected int limit;

    public Task(PoolExecutor pool, I input, int limit, int timeout) {
        this.pool = pool;
        this.input = input;
        this.limit = limit;
        this.timeout = timeout;
    }

    public O getOutput() {
        return output;
    }

    public I getInput() {
        return input;
    }

    public Exception getError() {
        return e;
    }

    static public DecimalFormat decFormat = new DecimalFormat("0000");
}
